package com.gmail.liulijuan;

public class MaoPaoOrder {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
		int b;
		for (int i = 1; i < a.length; i++) {
			for (int j = 0; j < a.length-i; j++) {
				if (a[j+1]>a[j]) {
					b=a[j];
					a[j]=a[j+1];
					a[j+1]=b;
				}	
				
			}
		}
		for (int i = 0; i < a.length; i++) {
			System.out.printf("%2d",a[i]);
		}
	}

}
